<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="http://res.wisedu.com/fe_components/iconfont/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="http://res.wisedu.com/fe_components/jqwidget/blue/bh.min.css" />
    <link rel="stylesheet" type="text/css" href="http://res.wisedu.com/fe_components/jqwidget/blue/bh-scenes.min.css" />
    <link rel="stylesheet" type="text/css" href="http://res.wisedu.com/bower_components/animate.css/animate.min.css" />
    <link rel="stylesheet" type="text/css" href="http://res.wisedu.com/bower_components/sentsinLayer/skin/layer.css" />
    <link rel="stylesheet" type="text/css" href="http://res.wisedu.com/fe_components/bhtc/bhtc-datetimepicker/css/blue/bhtc-datetimepicker.css" />
    <script src="http://res.wisedu.com/fe_components/jquery-1.11.3.js"></script>
    <!-- weekTable -->
    <link rel="stylesheet" type="text/css" href="./weekSelector.css" />
    <script src="./weekSelector.js"></script>
</head>

<body>
    <div>
        <table style="margin-top:10px">
            <tr>
                <td style="padding:10px">周次</td>
                <td>
                    <div class="d">
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align:center;padding:10px">
                    <input type="button" value="获取值" onclick="getVal()" />
                </td>
            </tr>
        </table>
    </div>
    <script type="text/javascript">
    var w = new WeekSelector({
        container: ".d",
        weekNum: '101010100000000000000000000000'
            //,weekName: '1-7单周'
    });
    w.render();

    function getVal() {
        var obj = w.getResult();
        console.log(obj);
        alert(obj.weekNum + '\n' + obj.weekName);
    }
    </script>
</body>

</html>
